package com.hsjk.szwj.module.system.api.file;

import com.hsjk.szwj.framework.common.enums.OssSavePlaceEnum;
import com.hsjk.szwj.module.system.service.file.IOssService;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

/**
 * @author chenjiawei
 * @desc
 * @Date 2023/08/21 13:49
 **/
@Service
public class OssApiImpl implements IOssApi {

    @Resource
    private IOssService ossService;

    @Override
    public String upload(OssSavePlaceEnum ossSavePlaceEnum,
                         MultipartFile multipartFile) {
        return ossService.upload(ossSavePlaceEnum, multipartFile);
    }

    @Override
    public boolean downloadFile(OssSavePlaceEnum ossSavePlaceEnum,
                                String source, String target) {
        return ossService.downloadFile(ossSavePlaceEnum, source, target);
    }
}
